package org.dromara.tearoom.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.tearoom.domain.bo.TerOrderBo;
import org.dromara.tearoom.domain.vo.TerOrderVo;
import org.dromara.tearoom.mapper.TerOrderMapper;
import org.dromara.tearoom.mapper.TerRoomDetailsMapper;
import org.dromara.tearoom.mapper.TerUserSubscriptionMapper;
import org.dromara.tearoom.service.ITerCleanOrderService;
import org.springframework.stereotype.Service;

/**
 * 保洁订单 实现类
 * @author CKJ
 * @description: 保洁订单
 * @date 2025/4/18 11:11
 */
@RequiredArgsConstructor
@Service
public class TerCleanOrderServiceImpl implements ITerCleanOrderService {

    private final TerOrderMapper terOrderMapper;
    private final TerRoomDetailsMapper roomDetailsMapper;
    private final TerUserSubscriptionMapper userSubscriptionMapper;

    /**
     * 分页查询订单列表
     *
     * @param bo        查询条件
     * @param pageQuery 分页参数
     * @return 订单分页列表
     */
    @Override
    public TableDataInfo<TerOrderVo> queryPageList(TerOrderBo bo, PageQuery pageQuery) {
        Page<TerOrderVo> result = terOrderMapper.selectVoPageWithDetails(pageQuery.build(), bo);
        return TableDataInfo.build(result);
    }

}
